Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 4 - Geometric Operations


Summary of Geometric Operations

Constants and Data Types

Contour Directions

enum gxContourDirections {
   gxCounterclockwiseDirection,
   gxClockwiseDirection
};
typedef long gxContourDirection;

Functions

Determining and Reversing Contour Direction

gxContourDirection GXGetShapeDirection
			(gxShape source, long contour);
void GXReverseShape	(gxShape target, long contour);

Breaking Shape Contours

void GXBreakShape	(gxShape target, long index);

Reducing and Simplifying Shapes

void GXReduceShape	(gxShape target, long contour);
void GXSimplifyShape	(gxShape target);

Incorporating Style Information Into Shape Geometries

void GXPrimitiveShape	(gxShape target);

Finding Geometric Information About Shapes

gxWide *GXGetShapeLength	(gxShape source, long index, gxWide *length);
gxPoint *GXShapeLengthToPoint
				(gxShape target, long index, Fixed length, 
				gxPoint *location, gxPoint *tangent);
gxPoint *GXGetShapeCenter	(gxShape source, long index, gxPoint *center);
gxWide *GXGetShapeArea		(gxShape source, long index, gxWide *area);

Getting and Setting Shape Bounds

gxRectangle *GXGetShapeBounds
			(gxShape source, long index, 
			gxRectangle *bounds);
void GXSetShapeBounds	(gxShape target, const gxRectangle *newBounds);

Insetting Shapes

void GXInsetShape		(gxShape target, Fixed inset);

Determining Whether Two Shapes Touch

gxBoolean GXTouchesRectanglePoint
				(const gxRectangle *target, 
				const gxPoint *test);
gxBoolean GXTouchesBoundsShape
				(const gxRectangle *target, gxShape test);
gxBoolean GXTouchesShape	(gxShape target, gxShape test);

Determining Whether One Shape Contains Another

gxBoolean GXContainsRectangle
				(const gxRectangle *container, 
				const gxRectangle *test);
gxBoolean GXContainsBoundsShape
				(const gxRectangle *container, gxShape test, 
				long index);
gxBoolean GXContainsShape	(gxShape container, gxShape test);

Performing Geometric Arithmetic With Shapes

gxBoolean GXIntersectRectangle
				(gxRectangle *target,const gxRectangle *source, 
				const gxRectangle *operand);
gxRectangle *GXUnionRectangle
				(gxRectangle *target, 
				const gxRectangle *source, 
				const gxRectangle *operand);
void GXIntersectShape		(gxShape target, gxShape operand);
void GXUnionShape		(gxShape target, gxShape operand);
void GXDifferenceShape		(gxShape target, gxShape operand);
void GXReverseDifferenceShape
				(gxShape target, gxShape operand);
void GXExcludeShape		(gxShape target, gxShape operand);
void GXInvertShape		(gxShape target);


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help